package com.bjtu.ptsite.tracker.service;

import com.bjtu.ptsite.model.PageResult;
import com.bjtu.ptsite.model.Result;
import com.bjtu.ptsite.tracker.entity.TrackerMessage;
import com.bjtu.ptsite.tracker.entity.TrackerRequest;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.util.List;
import java.util.Map;

/**
 *
 * @author Zehao Wang, Junjie Zhang, Yutao Wei
 *
 */
public interface TrackerService {



    String createTorrent(TrackerRequest param,MultipartFile file);

    Result getMagnet(TrackerRequest Param);

    boolean uploadTorrent(TrackerRequest param);

    void d();

    String downloadTorrent(TrackerRequest param,String passKey);

    PageResult<TrackerMessage> getTorrentList(int page, int size, Integer categoryId);

    boolean dumpRegisteredTorrents();

    List<Map<String, Object>> listPeers(String infoHash);

    TrackerMessage getSpTorrent(Integer id);

    PageResult<TrackerMessage> getUserTorrentList(int flag, int userId, int page, int size, Integer categoryId);

    boolean isConnect(TrackerRequest param);
}
